package cn.yma;

import cn.yma.bus.annotation.MessageBus;
import cn.yma.bus.annotation.MessageSubscribe;
import org.springframework.stereotype.Component;

@Component
@MessageBus
public class MessageComponent {

    @MessageSubscribe(topic = "test1")
    public void test1(String msg){
        System.out.println("test1:" + msg);
    }

    @MessageSubscribe(topics = {"test2-1","test2-2"})
    public void test2(String msg){
        System.out.println("test2-1 or test2-2:" + msg);
    }

}
